package com.tang.algorithm.binaryTree;


/**
 * @author tlm
 * @Description 反转二叉树
 * @date 2020/7/30 6:33 下午
 */
public class LeetCode226 {
    public TreeNode invertTree(TreeNode root) {
        if (root == null)
            return null;
        TreeNode temp = root.left;
        root.left=invertTree(root.right);
        root.right=invertTree(temp);
        return root;
    }
}
